You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Dew.Math.Units Namespace > Classes > MtxIntDiff Class > MtxIntDiff Methods > MtxIntDiff.WeightsGauss Method
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
MtxIntDiff.WeightsGauss Method

Gauss base points and weights.

Syntax
C#
Visual Basic
public static void WeightsGauss(int NumPoints, [In] TVec Points, [In] TVec Weights, [In] TMtxFloatPrecision FloatPrecision);

Calculates base points and weight factors by using the so called Gauss algorithm given by Davis and Rabinowitz in 'Methods of Numerical Integration', page 365, Academic Press, 1975.

Use a ten point Gauss formula to evaluate six(x) on interval [0,PI]. For start use only one subsection.

private double IntFun(TVec x, TVec c, params object[] o) { double x = x[0]; return System.Math.Sin(x)*System.Math.Exp(-x*x); } private void Example() { Vector bpoints = new Vector(0); Vector weights = new Vector(0); MtxIntDiff.WeightsGauss(10,bpoints,weights); double area = MtxIntDif.QuadGauss(IntFun,-0.5*System.Math.PI,System.Math.PI,bpoints,weights,64); }
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!